<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <!--
        IE=edge：让IE使用最新的渲染模式，针对ie8 (7,8的渲染模式是不一样的)
        http://blog.csdn.net/www3300300/article/details/12992489
    -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--
        针对移动设备,网站显示宽度等于设备屏幕显示宽度,内容缩放比例为1:1
        http://www.cnblogs.com/yuzhongwusan/p/4184923.html
    -->
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!--将下面的 <meta> 标签加入到页面中，可以让部分国产浏览器默认采用高速模式渲染页面：-->
    <meta name="renderer" content="webkit">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
     <link href="websrc/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="websrc/css/mydeck.css">
    <link rel="stylesheet" href="websrc/css/card.css">
     <link rel="stylesheet" href="websrc/css/common.css">
     <link rel="stylesheet" type="text/css" href="websrc/css/htmleaf-demo.css">
     <link rel="stylesheet" href="websrc/css/style.css">
     <link rel="stylesheet" href="websrc/css/jquery.dialogbox.css">
     
     <link rel="stylesheet" type="text/css" href="websrc/201608301507/css/normalize.css" />
	<link rel="stylesheet" type="text/css" href="websrc/201608301507/css/htmleaf-demo.css">
	<link rel="stylesheet" href="websrc/201608301507/dist/jdialog.min.css">
      <link rel="stylesheet" href="websrc/201608301507/site/rainbow-customer.min.css">
     <!--  <link rel="stylesheet" href="websrc/201608301507/site/style.css"> -->
     
     

    <!--下面这一大块的注释是说:"为了让IE9以下的浏览器支持响应式和HTML5标签.需要引入下面两个JS文件"-->
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="websrc/js/jquery-3.2.1.js"></script>
	
    <script >

        /* $(function () {
            $("#preview_window,#preview_window1,#preview_window2,#preview_window3").hide();
            $('#preview').click(function (event) {
                //取消事件冒泡
                event.stopPropagation();
                //按钮的toggle,如果div是可见的,点击按钮切换为隐藏的;如果是隐藏的,切换为可见的。
                $('#preview_window,#preview_window1,#preview_window2,#preview_window3').toggle('slow');
            });
            //点击空白处或者自身隐藏弹出层，下面分别为滑动和淡出效果。
            $(document).click(function (event) { $('#preview_window,#preview_window1,#preview_window2,#preview_window3').slideUp('slow')});
            $('#preview_window,#preview_window1,#preview_window2,#preview_window3').click(function (event) {
                //$(this).fadeOut(1000)
                event.stopPropagation();
            });
        });
      
        $(document).ready(function() {
    		$('#list').click(function(event) {
    			event.preventDefault();
    			$('#products .item').addClass('list-group-item');
    		});
    		$('#grid').click(function(event) {
    			event.preventDefault();
    			$('#products .item').removeClass('list-group-item');
    			$('#products .item').addClass('grid-group-item');
    		});
    	});
         */
         
      
           /*   var titleKey = JSON.parse(note.areaNames)[0]; //正面
             var json = JSON.parse(note.areaContents);
             var titleValue = json[titleKey];
             value = titleValue;
              */
             
      //ajax预览卡片
    	var afterPreviewDeck = function(obj){
    	  alert(obj.id);
    	  var typeId=obj.id;
    	  $('#dialog-1').html('');
    		$.getJSON(
    			"/memorypalace/cardaction_getcardstylebynotetypeId.action?noteTypeId="+typeId,
    				{},
    				function(json){
    					$.each(json,function(i,obj){
        						 var html='';
        						/* html +='<div class="content">'; */
        						html +=   '<span class="button" data-dismiss="JDialog" id="test" style="margin-left: 680px">×</span>';
        						html +=      '<h3>卡片样式名称：'+obj.cardStyleName+'</h3>'; 
        						html +=       '<div>';
        						html +=         '<p>正面版式：'+obj.frontHTML+'</p>';
        						html +=          '<ul>';
        						html +=              '<li><strong>反面版式:</strong>' +obj.backHTML+'</li>';
        						html +=             '<li><strong>样式:</strong>'+obj.css+'</li>' ;			
        						html +=		'</ul>';
        						/* html += '</div>';  */       
    							$('#dialog-1').append(html);		
    							$('#dialog-1').trigger("create");
    					});
    	}); 
						/* 	$('.content .button').append("<br />卡片样式名称："+obj.cardStyleName+" 正面版式："+obj.frontHTml+" 反面版式："+obj.backHTML+" 生日："+obj.css);
						});
    				} */
    			
    				};	
    	
      
    </script>
    
   
</head>
<body style="background-color: white;">
<div class="header clearfix">
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand header-left clearfix" href="#">
                <div class="logo">LOGO</div>
                <div class="projectName">记忆宫殿</div>
                <div class="projectEnglishName">Memory Palace</div>
            </a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li ><a href="/memorypalace/index-login.html">个人首页</a></li>
                    <li><a href="/memorypalace/study/getsl.action">学习列表</a></li>
                    <li class="active"><a href="/memorypalace/mydeck.html">浏览牌组<span class="sr-only">(current)</span></a></li>
                    <li><a href="/memorypalace/myknowledgetree.html">知识体系</a></li>



            </ul>

            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">Wing</a></li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
</div>
<div class="container" style="background-color: #F8F8F8">
		<div class="btn-wrapper">
			<strong></strong>
			<div class="btn-group">
				<a href="#" id="list" ><span> </span></a> 
				<a href="#" id="grid" ><span></span></a>
				<div></div>
			</div>

		</div>
<div id="products" class="row list-group">
			<c:forEach items="${noteList}" var="note" varStatus="index">
				<c:set value="${note.noteTypeId}" var="noteId"></c:set>
				<div class="item  col-xs-4 col-lg-4">
					<div class="thumbnail">
					<div class="panel panel-default" style="border: none">
                    <div class="panel-heading">
                        <h3 class="panel-title">${note.areaNames}</h3>
                      
                    </div>
                    <div class="panel-body">
                        ${note.areaContents}
                    </div>
                    <div class="panel-body">
                        ${note.noteCreateTime}
                    </div>                                                              
                    <div class="panel-body">
                        ${note.noteEditTime}
                    </div>
                    
                </div>
						<div>
								<h4  id="_name${index.count}" class="group inner list-group-item-heading" style="text-align: center"></h4>
							</div>
							<div class="row">
                    <div class="col-xs-12 col-md-6">
                        <p class="lead">
                           </p>
                    </div>
                 <!--  <a href data-toggle="JDialog" data-target="dialog-1" style="margin-left: 130px">预览</a> -->
                    <%--<button class="button" data-toggle="JDialog" data-target="dialog-1" style="margin-left: 130px" id="${noteId}"  onclick="afterPreviewDeck(this)">预览</button> --%>
                </div>
					</div>
					 
				</div>
			</c:forEach>
		</div>




<div class="jDialog" id="dialog-1" style="background-color: white">
    <div class="content">
    <!-- <span class="button" data-dismiss="JDialog" id="test" style="margin-left: 680px">×</span>
        <h3></h3>
        <div>
            <p>This is a modal window. You can do the following things with it:</p>
            <ul>
                <li><strong>Read:</strong> modal windows will probably tell you something important so don't forget
                    to
                    read what they say.
                </li>
                <li><strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and
                    appreciate its presence.
                </li>
                <li><strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and
                    appreciate its presence.
                </li>
                <li><strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and
                    appreciate its presence.
                </li>
                <li><strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and
                    appreciate its presence.
                </li>
                <li><strong>Close:</strong> click on the button below to close the modal.</li>
            </ul> -->
            
        </div>
    </div>
</div>



	
	
	
	

	
	
	
	
				

		

  <!--   <div id="preview_window" class="_container_bottom_3"> </div>
        <div id="preview_window1" class="_container_bottom_3_1"><img src="websrc/imgs/before.png"></div>
        <div id="preview_window2" class="_container_bottom_3_2"><img src="websrc/imgs/later.png"></div>
        <div id="preview_window3" class="_container_bottom_3_3">
        <a class="btn btn-info btn-sm" >正面</a>
        <a class="btn btn-info btn-sm" >反面</a>
        </div>
</div> -->




<!--中:必须在JS文件引入之前引入JQ文件,这里src引用的是本地.线上建议使用CDN引用)
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed，bootstrap.min.js是基于jquery的 -->
<script src="js/bootstrap.min.js"></script>

<script src="websrc/201608301507/site/rainbow-custom.min.js"></script>
	<script src="websrc/201608301507/dist/jdialog.min.js"></script>
	<script type="text/javascript">
		$("#dialog-1").jDialog({
	        skinClassName: 'demo',
	        animationType: 'fade-in'
	    });

	</script>
  
</body>
</html>